package com.lhn.bbs.mapper;

import com.lhn.bbs.entity.Userclass;
import com.lhn.bbs.entity.UserclassExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserclassDao {
    long countByExample(UserclassExample example);

    int deleteByExample(UserclassExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Userclass record);

    int insertSelective(Userclass record);

    List<Userclass> selectByExample(UserclassExample example);

    Userclass selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Userclass record, @Param("example") UserclassExample example);

    int updateByExample(@Param("record") Userclass record, @Param("example") UserclassExample example);

    int updateByPrimaryKeySelective(Userclass record);

    int updateByPrimaryKey(Userclass record);

//    加入班级
    Boolean addUserClass(Userclass userclass);
//    根据班级id删除班级成员
    Boolean deleteUserclassByclassid(Integer classid);

    //     根据userid将用户踢出班级
    long deleteClassByUserid(@Param("userid") Integer userid,@Param("classid") Integer classid);

//   查询是否存在
    Userclass findByid(Userclass userclass);
}